#!/usr/bin/env python
 
import requests
from lxml import etree
html=requests.get("https://www.sshuo.cc")
etree_html = etree.HTML(html.text)
a = etree_html.xpath('//*[@id="main"]/article/div/h1/a/text()')
for x in a:
    with open('1.txt','a') as code:
        code.write(x+'\n')
        print(x)
print ("爬取完成")
